<?php
$main = getJson();
echo $main;
?>
<?php
function getJson()	{
	include_once("../inc/checkArg.php");
	$mod = checkArg("mod","twoball");
	include_once("../inc/xml2mod.php");
	$sJson =csv2jsonHistory($mod);
	return $sJson;
}
?>
<?php
function csv2jsonHistory($mod)	{
	$sMod	=	$mod;
	include_once("../inc/file2history.php");
	$aHistory	=	file2history("../history/".$sMod.".csv");
	$sJson	=	json_encode($aHistory);
	return $sJson;
}
?>